package com.zzh.lib.core.model;


import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ZZH on 2023/2/4.
 *
 * @date: 2023/2/4 15:41
 * @email: zzh_hz@126.com
 * @author: zzh
 * @description: com.zzh.lib.core.model
 */
public class HVideoThumbModel implements Parcelable {
    private String videoRotation;
    private int videoWidth;
    private int videoHeight;
    private long videoDuration;


    public String getVideoRotation() {
        return videoRotation == null ? "" : videoRotation;
    }

    public void setVideoRotation(String videoRotation) {
        this.videoRotation = videoRotation;
    }

    public int getVideoWidth() {
        return videoWidth;
    }

    public void setVideoWidth(int videoWidth) {
        this.videoWidth = videoWidth;
    }

    public int getVideoHeight() {
        return videoHeight;
    }

    public void setVideoHeight(int videoHeight) {
        this.videoHeight = videoHeight;
    }

    public long getVideoDuration() {
        return videoDuration;
    }

    public void setVideoDuration(long videoDuration) {
        this.videoDuration = videoDuration;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.videoRotation);
        dest.writeInt(this.videoWidth);
        dest.writeInt(this.videoHeight);
        dest.writeLong(this.videoDuration);
    }

    public void readFromParcel(Parcel source) {
        this.videoRotation = source.readString();
        this.videoWidth = source.readInt();
        this.videoHeight = source.readInt();
        this.videoDuration = source.readLong();
    }

    public HVideoThumbModel() {
    }

    protected HVideoThumbModel(Parcel in) {
        this.videoRotation = in.readString();
        this.videoWidth = in.readInt();
        this.videoHeight = in.readInt();
        this.videoDuration = in.readLong();
    }

    public static final Creator<HVideoThumbModel> CREATOR = new Creator<HVideoThumbModel>() {
        @Override
        public HVideoThumbModel createFromParcel(Parcel source) {
            return new HVideoThumbModel(source);
        }

        @Override
        public HVideoThumbModel[] newArray(int size) {
            return new HVideoThumbModel[size];
        }
    };
}
